home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / disk / wastre12.zip / WASTREE.DOC < prev    next >
Text File  |  1997-04-05  |  9KB  |  172 lines

  1.  
  2. WasTree                                                            Ver. 1.2_______
  3.  
  4. Purpose: Measure disk space used and wasted by directories and directory
  5.          trees, and show what the figures would be if the directories were
  6.          located on other disks with other cluster sizes.
  7.  
  8. Format:     WASTREE [d:]path /D /V
  9.  
  10.                    d:   = drive letter
  11.                    path = directory to start from
  12.                    /D   = measure only the directory given,
  13.                            ignoring any subdirectories.
  14.                    /V   = "verbose" listing of all directories
  15.                             examined.
  16.  
  17.          Since WasTree writes to standard output, you can redirect its out-
  18.          put to the printer or to a file:
  19.  
  20.                WASTREE C:\BIN /D > PRN or filename
  21.  
  22. Remarks: When DOS stores a file on disk, it assigns to it a certain number
  23.          of clusters or "allocation units" of disk space.  If, as usually
  24.          happens, the file does not exactly fill the clusters assigned,
  25.          some space in the last assigned cluster is not actually occupied
  26.          by the file data.
  27.  
  28.          The size of these clusters depends on the size of the disk.  A DOS
  29.          disk can keep track of only so many clusters, so the larger the
  30.          disk, the larger the clusters have to be.  In consequence, the
  31.          larger the disk the more space it is likely to waste in those end
  32.          clusters.  So, you can usually reduce the waste by partitioning a
  33.          big disk into several small ones.  There are programs which give
  34.          you information about wastage on your disk, intended to help you
  35.          decide how to partition it.  They show how much space your present
  36.          disk wastes, and how much would be wasted if you re-partitioned it
  37.          in various ways.  They do not need to show what's happening in
  38.          anything smaller than the whole disk.
  39.  
  40.          WasTree is intended to help with a less substantial decision.  You
  41.          might save a little space by moving directories from one disk to
  42.          another.  For this purpose, you need to know what's happening in
  43.          various subdirectories and directory trees, and what would happen
  44.          to them on disks with different cluster sizes.  To this end,
  45.          WasTree will give you reports on a single directory, on a direc-
  46.          tory tree, or on a whole disk.  Here are three samples, showing
  47.          the command which produced them and the display it produced:
  48. WasTree                                                              Page 2_______
  49.  
  50.          C:\>D:\FWN /D                 <Report on a single directory>
  51.  
  52.                We found 96 files in D:\FWN
  53.                The files actually contain 1,568,281 bytes of data.
  54.  
  55.                             Cluster     Bytes Used         Bytes Wasted
  56.                              Size         Total          Total    Percent
  57.                ============================================================
  58.                                512       1,591,296         23,015   1.4%
  59.                              1,024       1,625,088         56,807   3.5%
  60.                              2,048       1,687,552        119,271   7.1%
  61.                              4,096       1,839,104        270,823  14.7%
  62.                This Disk =>  8,192       2,162,688        594,407  27.5% <=
  63.                             16,384       2,834,432      1,266,151  44.7%
  64.                             32,768       4,194,304      2,626,023  62.6%
  65.                             65,536       6,946,816      5,378,535  77.4%
  66.                ============================================================
  67.                WasTree 1.0                   fecit R. N. Wisan, March, 1997
  68.  
  69.          C:\>WASTREE D:\FWN            <Report on a directory tree>
  70.  
  71.                Starting with: D:\FWN
  72.  
  73.                We found 476 files in D:\FWN and its 13 subdirectories.
  74.                The files actually contain 7,906,212 bytes of data.
  75.                (We haven't counted bytes in the directories themselves.)
  76.  
  77.                             Cluster     Bytes Used         Bytes Wasted
  78.                              Size         Total          Total    Percent
  79.                ============================================================
  80.                                512       8,031,744        125,532   1.6%
  81.                              1,024       8,143,872        237,660   2.9%
  82.                              2,048       8,480,768        574,556   6.8%
  83.                              4,096       9,007,104      1,100,892  12.2%
  84.                This Disk =>  8,192      10,420,224      2,514,012  24.1% <=
  85.                             16,384      12,828,672      4,922,460  38.4%
  86.                             32,768      20,021,248     12,115,036  60.5%
  87.                             65,536      34,471,936     26,565,724  77.1%
  88.                ============================================================
  89.                WasTree 1.0                   fecit R. N. Wisan, March, 1997
  90. WasTree                                                              Page 3_______
  91.  
  92.          C:\>WASTREE D:\               <Report on a whole disk>
  93.  
  94.                Starting with: D:\
  95.  
  96.                We found 4,176 files in D:\ and its 180 subdirectories.
  97.                The files actually contain 132,654,031 bytes of data.
  98.                (We haven't counted bytes in the directories themselves.)
  99.  
  100.                             Cluster     Bytes Used         Bytes Wasted
  101.                              Size         Total          Total    Percent
  102.                ============================================================
  103.                                512     133,626,368        972,337   0.7%
  104.                              1,024     134,768,640      2,114,609   1.6%
  105.                              2,048     137,326,592      4,672,561   3.4%
  106.                              4,096     142,839,808     10,185,777   7.1%
  107.                This Disk =>  8,192     155,615,232     22,961,201  14.8% <=
  108.                             16,384     181,747,712     49,093,681  27.0%
  109.                             32,768     240,582,656    107,928,625  44.9%
  110.                             65,536     365,559,808    232,905,777  63.7%
  111.                ============================================================
  112.                WasTree 1.0                   fecit R. N. Wisan, March, 1997
  113.  
  114.          The "This Disk" arrow points to the actual cluster size, bytes
  115.          used and bytes wasted.  The other lines show what would be used
  116.          and wasted if the files found were located on disks which used
  117.          clusters of other sizes.  That's what gives you the basis for
  118.          deciding whether to move the directory or tree to a different
  119.          disk.
  120.  
  121.  
  122. Disk Sizes: Cluster size varies with the size of the disk:
  123.  
  124.                            Disk Size         Bytes/Cluster
  125.                            ---------         -------------
  126.                          most floppies              512
  127.                          320K/360K floppies       1,024
  128.                          Hard disks <128MB        2,048
  129.                          128MB  to  <256MB        4,096
  130.                          256MB  to  <512MB        8,192
  131.                          512MB  to  <1GB         16,384
  132.                            1GB  to  <2GB         32,768
  133.                            2GB  to  <4GB         65,536
  134.  
  135.          As a general rule, the smaller the files, the more efficient small
  136.          clusters will be, so you want to put small files on small disks
  137.          and large files on large disks.  Naturally, directory-fuls  won't
  138.          sort themselves out so neatly, and that's why you use WasTree.
  139.          Either it will show you where to put the trees and directories for
  140.          greatest efficiency, or it'll convince you that it doesn't matter.
  141. WasTree                                                              Page 4_______
  142. Legal Info:
  143.  
  144.  
  145.          Copyright (C) 1997 by R. N. Wisan.
  146.  
  147.          WasTree is freeware.  You may use and distribute this pretty much
  148.          as you please, provided that:
  149.  
  150.              - You keep the program and this documentation together.
  151.  
  152.              - You don't hack the program --don't change it in any way.
  153.  
  154.              - You don't try to prevent others from using and distributing
  155.                it.
  156.  
  157.          I can't guarantee that this program is harmless or even accurate,
  158.          and I can't promise to fix whatever is wrong with it, but I'd
  159.          appreciate bug reports and suggestions.
  160.  
  161.          Enjoy,
  162.  
  163. History:
  164.  
  165.    1.0  Original Issue (March 1997)
  166.    1.1  Cosmetic: fix spacing for Pct Wasted in display. (Mar 97)
  167.    1.2  Bugfix: under Win95 and certain other systems, WasTree was
  168.            unable to find directories.
  169.  
  170.                                                    R. N. Wisan, April 1997
  171.                                                        WISANR@hartwick.edu
  172.                                       37 Clinton St, Oneonta, NY 13820, USA